import { S } from '../../s';
import { IPSAppDEDataExport } from '../../app/dataentity/ipsapp-dedata-export';
import { IPSDEDataExport } from './ipsdedata-export';
import { IPSDEDataExportItem } from './ipsdedata-export-item';
import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEDataExportImpl
  extends PSModelObjectImpl
  implements IPSDEDataExport, IPSAppDEDataExport
{
  get codeName(): string {
    return this.M.codeName;
  }

  get expTag(): string {
    return this.M.expTag;
  }

  get expTag2(): string {
    return this.M.expTag2;
  }

  get maxRowCount(): number {
    return this.M.maxRowCount;
  }

  protected psdedataexportitems: IPSDEDataExportItem[];
  getPSDEDataExportItems(): IPSDEDataExportItem[] | null {
    return (
      this.psdedataexportitems ||
      (this.psdedataexportitems = this.fillChildListModel(
        this.M.getPSDEDataExportItems,
        S._1d5,
      ) as IPSDEDataExportItem[])
    );
  }

  findPSDEDataExportItem(objKey: any): IPSDEDataExportItem | null {
    return this.getPSModel5(
      S._1d5,
      this.getPSDEDataExportItems(),
      objKey,
    ) as IPSDEDataExportItem;
  }

  protected pssyspfplugin: IPSSysPFPlugin;
  getPSSysPFPlugin(): IPSSysPFPlugin | null {
    return (
      this.pssyspfplugin ||
      (this.pssyspfplugin = this.fillObjectModel(
        S._27c,
        this.M.getPSSysPFPlugin,
        S._2a7,
      ) as IPSSysPFPlugin)
    );
  }

  get defaultMode(): boolean {
    return this.M.defaultMode != null ? this.M.defaultMode : false;
  }

  get enableBackend(): boolean {
    return this.M.enableBackend;
  }

  get enableCustomized(): boolean {
    return this.M.enableCustomized != null ? this.M.enableCustomized : false;
  }

  get enableFront(): boolean {
    return this.M.enableFront;
  }
  get cls(): string {
    return 'PSDEDataExportImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._1fb || cls == S._1fc) return true;
    return super.instanceof(cls);
  }
}
